package com.difsonapps.contacttranslator.service.impl;

import java.util.*;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.difsonapps.contacttranslator.dao.SocialContactDAO;
import com.difsonapps.contacttranslator.dto.SocialContactDTO;
import com.difsonapps.contacttranslator.service.itf.SocialContactService;

@Repository
@Transactional
public class SocialContactServiceImpl implements SocialContactService {
	@Autowired
	protected SocialContactDAO socialContactDAO;

	@Transactional
	public void insert(SocialContactDTO socialContactDTO) {
		socialContactDAO.insert(socialContactDTO);
	}

	@Transactional
	public void update(SocialContactDTO socialContactDTO) {
		socialContactDAO.update(socialContactDTO);
	}

	@Transactional
	public SocialContactDTO get(int id) {
		return socialContactDAO.get(id);
	}

	@SuppressWarnings("unchecked")
	@Transactional
	public List<SocialContactDTO> getAll() {
		return socialContactDAO.getAll();
	}

	@Transactional
	public void delete(SocialContactDTO socialContactDTO) {
		socialContactDAO.delete(socialContactDTO);
	}
}
